const express=require("express")
const router=express.Router()
const bokeServ=require("../../services/message")

const {
    asyncHandler
}=require("../getSendResult")

router.post("/",asyncHandler(async(req,res,next)=>{
    console.log(req.query)
    const page=req.query.page||1;
    const limit=req.query.limit||5;
    return await bokeServ.getfenye(page,limit);
}))
router.post("/add",asyncHandler(async(req,res,next)=>{
    console.log(req.body)
    return await bokeServ.add(req.body)
}))
module.exports = router